package com.pwc.conversionTool.config;



import java.util.*;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;


public class UploadFileView {
	private static String filepath;
	
	public static UploadFileView initial(String filepath )
	{
		UploadFileView.filepath = filepath;
		return new UploadFileView();
	}


	/**
	 * 
	 * @return
	 */
	public static List<List<String>> GetFiles(){
		File file = new File(filepath);  
        File[] subFile = file.listFiles(); 
        List<List<String>> headList=new ArrayList<List<String>>();
        for (int iFileLength = 0; iFileLength < subFile.length; iFileLength++) {  
            if (!subFile[iFileLength].isDirectory()) {  
                String fileName = subFile[iFileLength].getName();  
                // if enf with .csv  
                headList.add(Arrays.asList(fileName));
            }  
        }  
		return headList;
	}
}
